EDIT If need return False
s for empty column, you can add condition for check if column is not empty:
df = pd.DataFrame(columns=['P1','P2','P3'])
print (df)
Empty DataFrame
Columns: [P1, P2, P3]
Index: []
df4 = pd.DataFrame({'Names':['Kumar','Ravi']})
mask=df4["Names"].str.contains(('|').join(df["P1"].values.tolist()),na=False)
mask = mask & (not df['P1'].empty)
print (mask)
0 False
1 False
Name: Names, dtype: bool
df = pd.DataFrame({'P1':['Kumar']}, columns=['P1','P2','P3'])
print (df)
P1 P2 P3
0 Kumar NaN NaN
df4 = pd.DataFrame({'Names':['Kumar','Ravi']})
mask=df4["Names"].str.contains(('|').join(df["P1"].values.tolist()),na=False)
mask = mask & (not df['P1'].empty)
print (mask)
0 True
1 False
Name: Names, dtype: bool